PROGRAMS	= print_pid mem_segments oom t_fork fork_whos_on_first fork_sig_sync \
fork_stdio_buf multi_wait ouch ouch2 intquit t_kill make_zombie io_wait_zombie procfs_pidmax copy copy_buffer_size1 seek_io \
copy_buffer_size65535 copy_buffer_size16384 copy_buffer_size8192 copy_buffer_size4096 copy_buffer_size512 copy_buffer_size1 \
free_and_sbrk mem_leak mem_leak_fix \
gnu_free

.PHONY:         all clean

CFLAGS=-pthread

all:            $(PROGRAMS)

clean: 
	@rm -f *.o *.a $(PROGRAMS) a.out core tfile tfile1

print_pid: print_pid.o

copy_buffer_size1: copy.c
	gcc -o $@ -D BUF_SIZE=1 copy.c

copy_buffer_size512: copy.c
	gcc -o $@ -D BUF_SIZE=512 copy.c

copy_buffer_size4096: copy.c
	gcc -o $@ -D BUF_SIZE=4096 copy.c

copy_buffer_size8192: copy.c
	gcc -o $@ -D BUF_SIZE=8192 copy.c

copy_buffer_size16384: copy.c
	gcc -o $@ -D BUF_SIZE=16384 copy.c

copy_buffer_size65535: copy.c
	gcc -o $@ -D BUF_SIZE=131070 copy.c
